/**
 * Copyright (c) 2012, Camelot and/or its affiliates. All rights reserved.
 * Camelot PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.camelot.ccr.system.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.camelot.ccr.global.controller.BaseController;
import com.camelot.ccr.system.dao.MatchTeamDao;
import com.camelot.ccr.system.dao.MatchTypeDao;
import com.camelot.ccr.system.persistence.MatchTeam;

/**
 * <pre>
 * 车队信息Controller
 * </pre>
 * @author Liu Jun
 * @version V0.1, 2014-5-23 下午2:11:38
 */
@Controller
@RequestMapping("/manage/matchteam")
public class MatchTeamController extends BaseController {

	@Resource
	private MatchTeamDao matchTeamDao;
	@Resource
	private MatchTypeDao matchTypeDao;
	/**
	 * <pre>
	 * 查询车队信息
	 * </pre>
	 * @param matchTeam
	 * @param model
	 * @return 车队列表
	 * @author Liu Jun, 2014-5-23 下午5:36:47
	 */
	@RequestMapping("/list")
	public String list(MatchTeam matchTeam,ModelMap model){
		List<MatchTeam> list = matchTeamDao.findByExample(matchTeam);
//		List<MatchType> matchTypeList = matchTypeDao.getAll();
		
		model.put("list", list);
//		model.put("matchTypeList", matchTypeList);
		return "/manage/matchteam/team_index";
	}
	
	/**
	 * <pre>
	 * 查询车队信息
	 * </pre>
	 * @param matchTeam
	 * @param model
	 * @return 车队列表
	 * @author Liu Jun, 2014-5-23 下午5:36:47
	 */
	@RequestMapping("/add")
	public String add(MatchTeam matchTeam,ModelMap model){
//		List<Team> teamList = teamDao.getAll();
//		model.put("teamList", teamList);
		return "/manage/matchteam/team_add";
	}
	
}
